package org.leaf.green.b2b

class Package {

    String serialNumber
    String name
    Boolean isActive

    static constraints = {
        serialNumber(nullable:false, blank:false, maxSize : 3, unique : true)
        name(nullable:false, blank:false, maxSize : 50)
        isActive(nullable:false)
    }

    String toString(){
        return "$serialNumber-$name"
    }

    static mapping = {
        table 'B2B_PACKAGE'
    }
}
